cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()
rosbuild_genmsg()

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

rosbuild_add_library(${PROJECT_NAME} src/topic/topic.cpp src/enumtostring.cpp)

# Voice example build commands.
#rosbuild_add_library(${PROJECT_NAME} src/voice/voice_example.cpp)
#rosbuild_add_executable(voiceExample src/voice/voice_example.cpp)

# RViz model node build commands.
rosbuild_add_executable(ears_model_node src/model/ears.cpp)
target_link_libraries(ears_model_node ${PROJECT_NAME})

rosbuild_add_executable(trunk_model_node src/model/trunk.cpp)
target_link_libraries(trunk_model_node ${PROJECT_NAME})

rosbuild_add_executable(eyebrows_model_node src/model/eyebrows.cpp)
target_link_libraries(eyebrows_model_node ${PROJECT_NAME})

rosbuild_add_executable(demo_model_node src/model/demo.cpp)
target_link_libraries(demo_model_node ${PROJECT_NAME})

rosbuild_add_executable(controller_node src/PS3Controller/controller.cpp)
target_link_libraries(controller_node ${PROJECT_NAME})

# Emotion processing build commands.
rosbuild_add_library(ears_handler_node src/topic/topic.cpp)
rosbuild_add_library(ears_handler_node src/emotion/emotion_handler.cpp)
rosbuild_add_executable(ears_handler_node src/emotion/ears_handler.cpp)
rosbuild_add_library(trunk_handler_node src/topic/topic.cpp)
rosbuild_add_library(trunk_handler_node src/emotion/emotion_handler.cpp)
rosbuild_add_executable(trunk_handler_node src/emotion/trunk_handler.cpp)
rosbuild_add_library(eyebrow_handler_node src/topic/topic.cpp)
rosbuild_add_library(eyebrow_handler_node src/emotion/emotion_handler.cpp)
rosbuild_add_executable(eyebrow_handler_node src/emotion/eyebrow_handler.cpp)
rosbuild_add_library(emotion_controller_node src/topic/topic.cpp)
rosbuild_add_library(emotion_controller_node src/emotion/emotion_handler.cpp)
rosbuild_add_executable(emotion_controller_node src/PS3Controller/controller_emotion.cpp)
rosbuild_add_executable(eyes_handler_node src/emotion/eyes_handler.cpp src/emotion/emotion_handler.cpp src/topic/topic.cpp)

rosbuild_add_executable(soundtest src/emotion/SoundPlayerTest.cpp)
